import { request } from "@/utils/service"
import { requestJson } from "@/utils/serviceJson"

/** 增 */
export function createTableDataApi(data: {}) {
  return requestJson({
    url: "biz/notice/add",
    method: "post",
    data
  })
}

/** 删 */
export function deleteTableDataApi(data: any) {
  return requestJson({
    url: `biz/notice/delete`,
    method: "post",
    data
  })
}

/** 改 */
export function updateTableDataApi(data: {}) {
  return requestJson({
    url: "biz/notice/edit",
    method: "post",
    data
  })
}

/** 查 */
// { data: []; total: number; code: number }
export function getTableDataApi(params: {}) {
  return request<any>({
    url: "biz/notice/page",
    method: "get",
    params
  })
}

/** 详情 */
export function getDetailDataApi(params: {}) {
  return requestJson({
    url: "biz/notice/detail",
    method: "get",
    params
  })
}
